//MAX-SAT SA problem-depended class
//$Id: maxsat_sa.h 339 2010-02-28 13:20:14Z Oleg.Bulychov $
#pragma once

#include "projects/maxsat/maxsat.h"
#include "solvers/sa/sa_common.h"

//__________________________________________________________________________________
template<>
struct solution<MaxSat_Solution, sa_tag>:
    public MaxSat_Solution
{
public:
    template<class E>
    void move(E* env, uniform_random& rnd, double probability)
    {
        for (size_t i = 0; i < data_.size(); ++i)
        {
            if (rnd.next_Double() < probability)
            {
                data_[i] = !data_[i];
                changed_ = true;
            }
        }
    }
};
//__________________________________________________________________________________

//EOF!
